<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>时间测试</title>
    <script src="../js/react.js"></script>
    <script src="../js/JSXTransformer.js"></script>
</head>
<body>
<div id="example"></div>

<script type="text/jsx">
    var pStyle={
        color:'red'
    };
    var DateTesting =React.createClass({
        render: function () {
            return (
                    <p >Current time is <span style={pStyle}>{this.props.date.toString()}</span> </p>
            );
        }
    });

    setInterval(function () {
        React.render(
                <DateTesting date={new Date()}></DateTesting>,
                document.getElementById('example')
        );
    });
</script>
</body>
</html>